package com.liu.entity;


import java.sql.Timestamp;
/*
@name:
@description:
@author: lzy
@title: 天王盖地虎!!!
@time:  2021-06-26 14:48:18
*/
public class Working {

  private long id;
  private String title;
  private String content;
  private String typeName;
  private String date;
  private java.sql.Timestamp creatDate;
  private long type;

  public String getTypeName() {
    return typeName;
  }

  public String getDate() {
    return date;
  }

  public Working(){

  }

  public Working(long id, String title, String content, Timestamp creatDate, long type) {
    this.id = id;
    this.title = title;
    this.content = content;
    this.creatDate = creatDate;
    this.type = type;
  }

  @Override
  public String toString() {
    return "Working{" +
            "id=" + id +
            ", title='" + title + '\'' +
            ", content='" + content + '\'' +
            ", typeName='" + typeName + '\'' +
            ", date='" + date + '\'' +
            ", creatDate=" + creatDate +
            ", type=" + type +
            '}';
  }
  public long getId() {
    return id;
  }

  public void setId(long id) {
    this.id = id;
  }


  public String getTitle() {
    return title;
  }

  public void setTitle(String title) {
    this.title = title;
  }


  public String getContent() {
    return content;
  }

  public void setContent(String content) {
    this.content = content;
  }


  public java.sql.Timestamp getCreatDate() {
    return creatDate;
  }

  public void setCreatDate(java.sql.Timestamp creatDate) {
    this.creatDate = creatDate;
    this.date=creatDate.toString();
  }


  public long getType() {
    return type;
  }

  public void setType(long type) {
    this.type = type;
    switch ((int)type){
      case 1:
        this.typeName="行政";
        break;
      case 2:
        this.typeName="人事";
        break;
      case 3:
        this.typeName="技术";
        break;
      default:
        this.typeName="未知";
    }
  }

}
